libxl: stop libxl_domain_info() consuming massive amounts of stack
authorPaul Durrant <pdurrant@amazon.com>
Thu, 28 May 2020 15:13:30 +0000 (16:13 +0100)
committerWei Liu <wl@xen.org>
Tue, 2 Jun 2020 11:57:01 +0000 (11:57 +0000)
commit2c4b1a7efb15292c0360f305b64581ac135ab8f2
tree7c685d23c69d1bfbb7ebae74ab625f39af2bfa5f
parentadb93c591af87549639894391f6827805cdf8ced
libxl: stop libxl_domain_info() consuming massive amounts of stack

Currently an array of 1024 xc_domaininfo_t is declared on stack. That alone
consumes ~112k. Since libxl_domain_info() creates a new gc this patch simply
uses it to allocate the array instead.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_domain.c